namespace MLSharp.RProject.Amore
{
	/// <summary>
	/// Defines all options and their defaults for <see cref="AmoreNeuralNetworkFactory"/>
	/// </summary>
	public class AmoreNeuralNetOptions
	{
		#region Public Properties

		/// <summary>
		/// An array containing the number of neurons in each hidden layer.  The number of entries
		/// in this array determines the number of hidden layers.
		/// </summary>
		/// <value>
		/// The default is 1 hidden layer with twice as many neurons as input variables.
		/// </value>
		public int[] NeuronCounts { get; set; }

		/// <summary>
		/// The maximum number of training iterations.
		/// </summary>
		/// <value>
		/// The default is 200.
		/// </value>
		public int MaxIterations { get; set; }

		/// <summary>
		/// The learning rate.
		/// </summary>
		/// <value>
		/// The default is 0.02.
		/// </value>
		public double LearningRate { get; set; }

		/// <summary>
		/// Flag that indicates whether or not to train in batch mode or
		/// incremental mode.
		/// </summary>
		/// <value>The default is true.</value>
		public bool BatchMode { get; set; }

		/// <summary>
		/// The starting momentum value.
		/// </summary>
		/// <value>
		/// The default is 0.
		/// </value>
		public double Momentum { get; set; }

		/// <summary>
		/// The error criterium to use.
		/// </summary>
		/// <value>
		/// The default is Least Mean Squares.
		/// </value>
		public CostFunction CostFunction { get; set; }

		/// <summary>
		/// The activation function to use for neurons in the hidden layers.
		/// </summary>
		/// <value>
		/// The default is Sigmoid.
		/// </value>
		public ActivationFunction HiddenLayerActivationFunction { get; set; }

		/// <summary>
		/// The activation function to use for neurons in the output layer.
		/// </summary>
		/// <value>
		/// The default is Purelinear.
		/// </value>
		public ActivationFunction OutputLayerActivationFunction { get; set; }

		#endregion

		#region Public Constructors

		/// <summary>
		/// Initializes all properties to their default values.
		/// </summary>
		public AmoreNeuralNetOptions()
		{
			MaxIterations = 200;
			NeuronCounts = new int[0];
			LearningRate = 0.02;
			BatchMode = true;
			Momentum = 0;
			CostFunction = CostFunction.LeastMeanSquares;
			HiddenLayerActivationFunction = ActivationFunction.Sigmoid;
			OutputLayerActivationFunction = ActivationFunction.Purelinear;
		}

		#endregion
	}
}